package com.online.edu.course.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.online.edu.course.entity.Category;
import com.online.edu.course.entity.Course;
import com.baomidou.mybatisplus.extension.service.IService;
import com.online.edu.course.entity.Vo.CourseREQ;
import com.online.edu.course.entity.Vo.PageVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * <p>
 * 课程表 服务类
 * </p>
 *
 * @author world
 * @since 2021-07-30
 */
public interface ICourseService extends IService<Course> {
    //分页查询课程列表
    List<CourseREQ> listPage(PageVo pageVo);

    //根据课程id新增分类列表下的课程数量
    void addCategoryNums(@Param("categoryId") long categoryId);

    //文件上传
    String uploadFile(MultipartFile file);

    //新增课程时与分类列表绑定
    void addCategoryMapping(@Param("categoryId") long categoryId,@Param("courseId") long courseId);

    public List<CourseREQ> listByWrapper(PageVo pageVo, QueryWrapper<Course> queryWrapper);
}
